﻿<!--#include file="../Include/Config.asp"-->
<%
dim Survey_id,sql
Survey_id=request.QueryString("Survey_id")
Call CheckNum(Survey_id)
sql="select * from survey where Survey_id="&Survey_id
rs.open sql,conn,1,1
Survey_conten=rs("Survey_content")
rs.close
if Survey_conten<>"" then
Survey_conten=split(Survey_conten,",")
for each question in Survey_conten
sqlt="select * from question where Question_id="&question
rst.open sqlt,conn,1,3
if not rst.eof then
  if rst("Question_type")=3 or rst("Question_type")=4 or rst("Question_type")=5 then'删除夹杂文本的问题的文本
  conn.execute("delete from text where Text_belong="&rst("Question_id"))
  else
  end if
rst.delete
end if
rst.close
next
end if
sql="delete from survey where Survey_id="&Survey_id
conn.execute(sql)
call ShowAlert("删除成功","SurveyAdmin.asp")
%>